It started as a trivia game, then became a quiz! By the way, you got correct answers on questions asked!
Discussion
This "trivia" game consists of 3 question files, Q1.HTM, Q2.HTM, and Q2.HTM. Each one contains a question, the proper answer, and the name of the next question file. The game engine, such as it is, is woefully ignorant of what's going on with the quiz proper, since it contains only these few lines:var qAsked = 0; var qCorrect = 0; function SubmitAnswer(what) { qAsked++; if(parent.frames[0].correctAnswer == what) { qCorrect++; } else alert('Sorry, you answered that incorrectly.'); parent.frames[0].location.href = parent.frames[0].nextQuestion+'.HTM'; }It's amazing how little scripting you actually need to write to get something done!The View Source option for this recipe will show you the first question page.
Copyright ©1998 by Charles River Media, All Rights Reserved